<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>图书详情</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/
    bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/frontcss/user/cart.css">
  </head>
  
  <body>
     <div id="menu" class="topmenu">
		<%@ include file="../menu.jsp" %>
     </div>
         <div class="myblock" style="padding-top:100px;"></div>
    <div class="container">
        <h2 style="color:#ff5800">全部图书</h2>
        <hr>
        <table class="table">
            <tbody>
				<tr>
				    <th>图书信息</th>
                    <th>持有人</th>
                    <th>所属分类</th>
                    <th>状态</th>
                    <th>操作</th>
				</tr>
				<s:iterator var="cartItem" value="#session.cart.cartItems">
				    <tr>
				        <td width="40">
				            <img src="${pageContext.request.contextPath}/<s:property value="#cartItem.product.image"/>">
				            <a target="_blank"><s:property value="#cartItem.product.pname"/></a>
				        </td>
				        <td>
				            <a target="_blank"><s:property value="#cartItem.product.pname"/></a>
				        </td>
				        <td class="belong" width="60">
				            <s:property value="#cartItem.count"/>
				        </td>
				        <td width="140">
				            <span class="subtotal">￥<s:property value="#cartItem.subtotal"/></span>
				        </td>
				        <td>
				            <a href="${ pageContext.request.contextPath }/cart_removeCart.action?pid=<s:property value="#cartItem.product.pid"/>" class="delete">删除</a>
				        </td>
				    </tr>
				</s:iterator>
            </tbody>
        </table>
        
        <div class="confirm">
           <div class="buttons">
                <button class="btn btn-info">清空收藏库</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button class="btn btn-info">生成订单</button>
           </div>
        </div>
        
    </div>
       
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/resources/plugins/bootstrap/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/resources/plugins/bootstrap/js/bootstrap.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> 
  </body>
</html>
  